package com.wu;

import com.wu.pojo.User;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @program: spring
 * @author: wulei
 * @create: 2022-12-21 12:37
 */
@Configuration
@ComponentScan("com.wu")
public class Application {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Application.class);
		System.out.println("启动成功-->" + context.getBean(User.class));
		BeanDefinition userBeanDef = context.getBeanDefinition("user");
		System.out.println(userBeanDef.getBeanClassName());
	}
}
